package com.command.demo1;

import com.command.demo1.face.Command;

/**
 * 调用者，他持有一个命令对象，并在某个时间点调用命令对象的execute方法，将请求付诸行动
 * 
 * @author dell
 * 
 */
public class SimpleRemoteControl {
	Command slot;

	public SimpleRemoteControl() {
	}

	public void setCommand(Command command) {
		slot = command;
	}

	public void buttonWasPressed() {
		slot.execute();
	}

}
